<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 一行打印5颗星星
        // for (var i = 1; i <= 5; i++) {
        //     console.log("")
        // }
        // 可以采用追加字符串方式，这样可以打印到控制台上
        var str = "";
        for (var i = 1; i <= 5; i++) {
            str += "★";
        }
        console.log(str);
    </script>
</body>

</html>